home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 12 / Cream of the Crop 12 (Part II) / Cream of the Crop 12 (Part II).iso / BBS / EZY120_1.ZIP / STRUCT.ARJ / CLIB.ARJ / DATE8.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-03-09  |  389 b   |  14 lines

  1.  
  2. #include <ezylib.h>
  3.  
  4. void Long2Date(long Date, word &Year, word &Month, word &Day,
  5.                         word &Hour, word &Min, word &Sec)
  6. {
  7.   Sec   = (word)((Date & 31) << 1);
  8.   Min   = (word)((Date >> 5) & 63);
  9.   Hour  = (word)((Date >> 11) & 31);
  10.   Day   = (word)((Date >> 16) & 31);
  11.   Month = (word)((Date >> 21) & 15);
  12.   Year  = (word)(((Date >> 25) & 127) + 1980);
  13. }
  14.